package com.contest.quartz.factory;

import com.contest.quartz.data.ScheduleJob;
import com.contest.quartz.utils.TaskUtils;
import org.apache.log4j.Logger;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;




/**
 * 
 * All rights Reserved, Designed By www.jeeweb.cn
 * 
 * @description: 计划任务执行处 无状态
 * @copyright: 2017 www.jeeweb.cn Inc. All rights reserved.
 *
 */
public class QuartzJobFactory implements Job
{
	public final Logger log = Logger.getLogger(this.getClass());

	public void execute(JobExecutionContext context) throws JobExecutionException
	{
		ScheduleJob scheduleJob = (ScheduleJob) context.getMergedJobDataMap().get("scheduleJob");
		TaskUtils.invokMethod(scheduleJob);
	}
}